package com.swh.xbsc.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.swh.xbsc.entity.Article;
import com.swh.xbsc.entity.User;
import com.swh.xbsc.mapper.UserMapper;
import com.swh.xbsc.service.ArticleService;
import com.swh.xbsc.service.UserService;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Author: swh
 * @Description:
 * @Date: 2020/11/17 20:45
 * @Version: 1.0
 */
@Service
@Transactional
public class UserServicelmpl extends BaseServicelmpl<User,Integer> implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public PageInfo<User> selectPage(int pageNum, int pageSize, Map<String, Object> map) {
        PageHelper.startPage(pageNum,pageSize);
        List<User> users = userMapper.selectPage(map);
        PageInfo<User> pageInfo = new PageInfo<>(users);
        return pageInfo;
    }

}
